//*************************************************
//Program #4       Optimal.h
//*************************************************
//Names: Stephen Durfrey,  Andrew Brock
//Due: April 23, 2010
//Operating Systems
//Related Files:  Optimal.cpp
// Optimal PRA: Guaruntees the lowest possible page fault rate
//  for a fixed number of frames.

#ifndef OPTIMAL_H
#define OPTIMAL_H

#include "Page_Replacement_Algorithm.h"

class Optimal : Page_Replacement_Algorithm
{
	private:
		void findPage();
		vector<int>::iterator ref_page;
		vector<int>::iterator findFrame(vector<int>::iterator max);
		vector<int>::iterator searchFrames(vector<int>::iterator value, vector<int>::iterator &replace);

	public:
		Optimal();
		void init(int frames, vector<int> ref_str);
		void run();
};

#endif

